package collection;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.locks.ReentrantLock;

public class CollectionsTest {


    static List<String> list = Collections.synchronizedList(new ArrayList<String>());
    static Map<String,String> map = Collections.synchronizedMap(new HashMap<>());
    static Set<String> set = Collections.synchronizedSet(new HashSet<>());

    static ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap<>();
    static CopyOnWriteArrayList copyOnWriteArrayList = new CopyOnWriteArrayList();
    static CopyOnWriteArraySet copyOnWriteArraySet = new CopyOnWriteArraySet();

    static  CopyOnWriteArrayList1 copyOnWriteArrayList1 = new CopyOnWriteArrayList1();

    public static void main(String[] args) {

        boolean add = copyOnWriteArrayList1.add(1);
        Object o = copyOnWriteArrayList1.get(0);
        System.out.println(o);
    }


    HashMap hashMap = new HashMap(11);

}
